Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sure current task build id works with queries / caching #665

Merged

Conversation

Sushisource
Copy link
Member

What was changed

Made the current task build id sent on activations consistent with what I just did in Go / Java.

Why?

Part of temporalio/features#253

Checklist

  1. Closes

  2. How was this tested:

  1. Any docs updates needed?

@Sushisource Sushisource requested a review from a team as a code owner January 8, 2024 23:41
@Sushisource Sushisource force-pushed the current-task-build-id-fix branch from 1312603 to db8745d Compare January 8, 2024 23:49
@@ -420,9 +418,15 @@ impl WorkflowMachines {
Some(workflow_activation_job::Variant::QueryWorkflow(_))
)
});
let is_replaying = self.replaying || all_query;
let build_id_for_current_task = if is_replaying {
self.current_wft_build_id.clone().unwrap_or_default()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does core need the same logic as Go to check for an empty build ID?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The lookahead works a bit differently and avoids this problem - I actually ended up changing the Go one to be a bit simpler and more similar in my last fix too.

@@ -420,9 +418,15 @@ impl WorkflowMachines {
Some(workflow_activation_job::Variant::QueryWorkflow(_))
)
});
let is_replaying = self.replaying || all_query;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aren't queries considered replaying anyway?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not until this point, that's where it happens

@Sushisource Sushisource merged commit c5b6445 into temporalio:master Jan 9, 2024
7 checks passed
@Sushisource Sushisource deleted the current-task-build-id-fix branch January 9, 2024 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants